//
//  RefreshManager.h
//  lottery
//
//  Created by hzy on 2017/7/22.
//  Copyright © 2017年 hzy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MJRefresh/MJRefresh.h>
#import "FriendServers.h"
typedef void (^BeginRefreshCompleteSuccessBlock)();
typedef void (^HeaderRefreshCompleteSuccessBlock)(id responseObject);
typedef void (^FooterRefreshCompleteSuccessBlock)(id responseObject);
typedef void (^FailedSuccessBlock)();


@interface RefreshManager : NSObject
@property (nonatomic,strong)MJRefreshNormalHeader * headerView;
@property (nonatomic,strong)MJRefreshAutoNormalFooter * footerView;
@property (nonatomic,assign)NSInteger index;
@property (nonatomic,strong)NSMutableDictionary *formParams;
@property (nonatomic,copy)HeaderRefreshCompleteSuccessBlock headerCompleteBlock;
@property (nonatomic,copy)FooterRefreshCompleteSuccessBlock footerCompleteBlock;
@property (nonatomic,copy)BeginRefreshCompleteSuccessBlock beginCompleteBlock;
@property (nonatomic,copy)FailedSuccessBlock failedSuccessBlock;
@property (nonatomic,strong)NSString *urlstring;
@property (nonatomic,assign)BOOL isPost;


-(instancetype)initWithurl:(NSString *)urlstring
                    Params:(NSDictionary *)Params;

-(void)setRefreshHeader:(UITableView *)scrollView;

-(void)setRefreshfooter:(UITableView *)scrollView;
@end
